import { post } from "../http"
import { get } from "../http"
import { del } from "../http"
import { put } from "../http"
import { puts } from "../http"
import { dels } from "../http"
export let login = async (params) => {
    let res = await post('/user/login', params)
    return res
}
export let getData = async (url, params) => {
    let res = await get(url, params)
    return res
}
// 添加商品的
export let getAddData = async (params) => {
    let res = await post('/admin/product', params)
    return res
}
// 渲染商品的
export let getProductList = async (params) => {
    let res = await get('/admin/product/page', params)
    return res
}
// 删除商品的
export let getDeletList = async (params) => {
    let res = await del(`/admin/product/${params}`)
    return res
}
// 编辑历程
export let editList = async (params) => {
    let res = await put('/admin/product', params)
    return res
}
export let regist = async (url, params) => {
    let res = await post(url, params)
    return res
}

export let root = async (url, params) => {
    let res = await get(url, params)
    return res
}

export let deleteItem = async (url, params) => {
    console.log("shancghu ")
    let res = await del(url, params)
    return res
}

export let text = async (url, params) => {
    let res = await put(url, params)
    return res
}
export let detail = async (url, params) => {
    let res = await get(url, params)
    return res
}

// 官网配置 获取
export let ApiWebConfig = async (params) => {
    let res = await get('/admin/web-config/getWebConfig', params)
    return res
}

// 官网配置 提交
export let upWebConfig = async (params) => {
    let res = await post("/admin/web-config/upWebConfig", params)
    return res
}

// 轮播图 分页数据
export let page = async (params) => {
    let res = await get('/admin/slideshow/page', params)
    return res
}

// 轮播图 上传数据
export let addSlideShow = async (params) => {
    let res = await post('/admin/slideshow/addSlideShow', params)
    return res
}
// 轮播图 编辑数据
export let updateSlideShow = async (params) => {
    let res = await post('/admin/slideshow/updateSlideShow', params)
    return res
}
// 轮播图 删除数据
export let deleteSlideShow = async (params) => {
    let res = await del(`/admin/slideshow/deleteSlideShow/${params}`)
    return res
}
// 获取招聘信息
export let getJobManage = async (params) => {
    let res = await get('/admin/recruit/page', params)
    return res
}
// 添加招聘信息
export let addJob = async (params) => {
    let res = await post('/admin/recruit/addRecruit', params)
    return res
}
// 删除招聘信息接口
export let deleteJob = async (params) => {
    let res = await del(`/admin/recruit/deleteRecruit/${params}`)
    return res
}
// 修改招聘信息接口
export let updateJob = async (params) => {
    let res = await puts('/admin/recruit/updateRecruit', params)
    return res
}
// 获取伙伴数据接口
export let getHbData = async (params) => {
    let res = await get('/admin/partner/page' + params)
    return res
}
// 添加伙伴数据接口
export let addPartner = async (params) => {
    let res = await post('/admin/partner', params)
    return res
}
// 删除伙伴数据接口
export let deleteHbData = async (params) => {
    let res = await del(`/admin/partner/${params}`)
    return res
}
// 修改伙伴数据接口
export let upHbData = async (params) => {
    let res = await put('/admin/partner', params)
    return res
}
// 获取id查询数据接口
export let getDetail = async (params) => {
    let res = await get(`/admin/partner/${params}`)
    return res
}
//批量删除
export let deleteAll = async (url, params) => {
    let res = await dels(url, params)
    return res
}
// 获取招聘信息
export let upData = async (params) => {
    let res = await post('/admin/about-us/updateAboutUs', params)
    return res
}